﻿using JW.IDao;
using JW.Model;
using JW.ORM;
using System.Collections.Generic;

namespace JW.Dao
{
    /// <summary>
    /// 满意度调查服务
    /// </summary>
    public class SCRLevel : ISCRLevel
    {
        public DbContextWrapper _dbContext;

        public SCRLevel(DbContextWrapper dbContext)
        {
            _dbContext = dbContext;
        }

        /// <summary>
        ///  获取 满意度列表 类型Type (1.微信端H5)
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>

        public List<M_Level> GetLevels(int type = 1)
        {
            var a = _dbContext.Query<M_Level>();
            var b = _dbContext.Query<M_Level>().ToList();

            return b;
        }

        /// <summary>
        /// 获取 满意度详情列表
        /// </summary>
        /// <param name="levelId"></param>
        /// <returns></returns>
        public List<M_LevelDetail> GetLevelDetails(int type = 1)
        {
            var b = _dbContext.Query<M_LevelDetail>().ToList();
            return b;
        }
    }
}